<script setup>
  import { ArrowLeft } from "@element-plus/icons-vue";
  import {defineProps} from "vue";

  let props = defineProps({
    color: Boolean
  });

</script>

<template>
  <div class="return-basic">
    <router-link class="return-link" to="/index">
      <div :class="['return-link-icon', props.color ? 'color-1': 'color-2']">
        <el-icon style="text-align: center">
          <ArrowLeft /></el-icon>
      </div>
      <div :class="['return-link-text', props.color ? 'color-1': 'color-2']">返回首页</div>
      </router-link>
  </div>
</template>

<style scoped>
  .return-basic {
    overflow: hidden;
    height: 24px;
    display: flex;
    align-items: center;
    position: absolute;
    left: 15px;
    top: 20px;
    z-index: 3;
  }

  .return-link {
    font-size: 15px;
    color: rgb(238, 238, 238);
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .return-link-icon {
    font-size: 18px;
    height: 24px;
    display: flex;
    align-items: center;
    margin-right: 2px;
    position: relative;
  }

  .return-link-text {
    font-size: 14px;
    position: relative;
    top: -1px;
  }

  .color-1 {
    color: rgb(238, 238, 238);
  }
  .color-2 {
    color: rgb(58, 58, 58);
  }
</style>